﻿using System;
using System.Runtime.InteropServices;

namespace Valve.VR
{
	// Token: 0x02000526 RID: 1318
	public class CVRTrackedCamera
	{
		// Token: 0x06001BB5 RID: 7093 RVA: 0x00011B88 File Offset: 0x0000FD88
		internal CVRTrackedCamera(IntPtr pInterface)
		{
			this.FnTable = (IVRTrackedCamera)Marshal.PtrToStructure(pInterface, typeof(IVRTrackedCamera));
		}

		// Token: 0x06001BB6 RID: 7094 RVA: 0x0005F460 File Offset: 0x0005D660
		public string GetCameraErrorNameFromEnum(EVRTrackedCameraError eCameraError)
		{
			IntPtr ptr = this.FnTable.GetCameraErrorNameFromEnum(eCameraError);
			return Marshal.PtrToStringAnsi(ptr);
		}

		// Token: 0x06001BB7 RID: 7095 RVA: 0x0005F488 File Offset: 0x0005D688
		public EVRTrackedCameraError HasCamera(uint nDeviceIndex, ref bool pHasCamera)
		{
			pHasCamera = false;
			return this.FnTable.HasCamera(nDeviceIndex, ref pHasCamera);
		}

		// Token: 0x06001BB8 RID: 7096 RVA: 0x0005F4AC File Offset: 0x0005D6AC
		public EVRTrackedCameraError GetCameraFrameSize(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref uint pnWidth, ref uint pnHeight, ref uint pnFrameBufferSize)
		{
			pnWidth = 0u;
			pnHeight = 0u;
			pnFrameBufferSize = 0u;
			return this.FnTable.GetCameraFrameSize(nDeviceIndex, eFrameType, ref pnWidth, ref pnHeight, ref pnFrameBufferSize);
		}

		// Token: 0x06001BB9 RID: 7097 RVA: 0x0005F4E0 File Offset: 0x0005D6E0
		public EVRTrackedCameraError GetCameraIntrinisics(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref HmdVector2_t pFocalLength, ref HmdVector2_t pCenter)
		{
			return this.FnTable.GetCameraIntrinisics(nDeviceIndex, eFrameType, ref pFocalLength, ref pCenter);
		}

		// Token: 0x06001BBA RID: 7098 RVA: 0x0005F504 File Offset: 0x0005D704
		public EVRTrackedCameraError GetCameraProjection(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, float flZNear, float flZFar, ref HmdMatrix44_t pProjection)
		{
			return this.FnTable.GetCameraProjection(nDeviceIndex, eFrameType, flZNear, flZFar, ref pProjection);
		}

		// Token: 0x06001BBB RID: 7099 RVA: 0x0005F52C File Offset: 0x0005D72C
		public EVRTrackedCameraError AcquireVideoStreamingService(uint nDeviceIndex, ref ulong pHandle)
		{
			pHandle = 0UL;
			return this.FnTable.AcquireVideoStreamingService(nDeviceIndex, ref pHandle);
		}

		// Token: 0x06001BBC RID: 7100 RVA: 0x0005F554 File Offset: 0x0005D754
		public EVRTrackedCameraError ReleaseVideoStreamingService(ulong hTrackedCamera)
		{
			return this.FnTable.ReleaseVideoStreamingService(hTrackedCamera);
		}

		// Token: 0x06001BBD RID: 7101 RVA: 0x0005F574 File Offset: 0x0005D774
		public EVRTrackedCameraError GetVideoStreamFrameBuffer(ulong hTrackedCamera, EVRTrackedCameraFrameType eFrameType, IntPtr pFrameBuffer, uint nFrameBufferSize, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize)
		{
			return this.FnTable.GetVideoStreamFrameBuffer(hTrackedCamera, eFrameType, pFrameBuffer, nFrameBufferSize, ref pFrameHeader, nFrameHeaderSize);
		}

		// Token: 0x06001BBE RID: 7102 RVA: 0x0005F59C File Offset: 0x0005D79C
		public EVRTrackedCameraError GetVideoStreamTextureSize(uint nDeviceIndex, EVRTrackedCameraFrameType eFrameType, ref VRTextureBounds_t pTextureBounds, ref uint pnWidth, ref uint pnHeight)
		{
			pnWidth = 0u;
			pnHeight = 0u;
			return this.FnTable.GetVideoStreamTextureSize(nDeviceIndex, eFrameType, ref pTextureBounds, ref pnWidth, ref pnHeight);
		}

		// Token: 0x06001BBF RID: 7103 RVA: 0x0005F5CC File Offset: 0x0005D7CC
		public EVRTrackedCameraError GetVideoStreamTextureD3D11(ulong hTrackedCamera, EVRTrackedCameraFrameType eFrameType, IntPtr pD3D11DeviceOrResource, ref IntPtr ppD3D11ShaderResourceView, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize)
		{
			return this.FnTable.GetVideoStreamTextureD3D11(hTrackedCamera, eFrameType, pD3D11DeviceOrResource, ref ppD3D11ShaderResourceView, ref pFrameHeader, nFrameHeaderSize);
		}

		// Token: 0x06001BC0 RID: 7104 RVA: 0x0005F5F4 File Offset: 0x0005D7F4
		public EVRTrackedCameraError GetVideoStreamTextureGL(ulong hTrackedCamera, EVRTrackedCameraFrameType eFrameType, ref uint pglTextureId, ref CameraVideoStreamFrameHeader_t pFrameHeader, uint nFrameHeaderSize)
		{
			pglTextureId = 0u;
			return this.FnTable.GetVideoStreamTextureGL(hTrackedCamera, eFrameType, ref pglTextureId, ref pFrameHeader, nFrameHeaderSize);
		}

		// Token: 0x06001BC1 RID: 7105 RVA: 0x0005F620 File Offset: 0x0005D820
		public EVRTrackedCameraError ReleaseVideoStreamTextureGL(ulong hTrackedCamera, uint glTextureId)
		{
			return this.FnTable.ReleaseVideoStreamTextureGL(hTrackedCamera, glTextureId);
		}

		// Token: 0x040010F3 RID: 4339
		public IVRTrackedCamera FnTable;
	}
}
